#region File Description
//-----------------------------------------------------------------------------
// MainForm.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion

#region Using Statements
using System;
using System.Windows.Forms;
using Microsoft.Xna.Framework;
#endregion

namespace WinFormsGraphicsDevice
{
    // System.Drawing and the XNA Framework both define Color types.
    // To avoid conflicts, we define shortcut names for them both.
    using GdiColor = System.Drawing.Color;
    using XnaColor = Microsoft.Xna.Framework.Graphics.Color;

    
    /// <summary>
    /// Custom form provides the main user interface for the program.
    /// In this sample we used the designer to add a splitter pane to the form,
    /// which contains a SpriteFontControl and a SpinningTriangleControl.
    /// </summary>
    public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

        private void spdVertical_TextChanged(object sender, EventArgs e)
        {
            // Do code here
            spinningTriangleControl.testText = spdVertical.Text;
        }

        private void NewObject_Click(object sender, EventArgs e)
        {
            spinningTriangleControl.CreateNewTriangle();
        }

        private void spinningTriangleControl_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left)
                spinningTriangleControl.CheckMouse(new Point(e.X, e.Y), true);
            else
                spinningTriangleControl.CheckMouse(new Point(e.X, e.Y), false);
        }
    }
}
